<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="connDbBean" scope="page" class="com.util.db"/>
<%@ page isELIgnored="false" %> 


<%
String id="";
String tablename=request.getParameter("tablename");
String comew= request.getHeader("Referer");
String[]   values   =   request.getParameterValues("pldel");
if(values!=null)
{
   for(int i=0;i<values.length;i++)
{
	id=id+values[i]+",";
	}
	
id=id.substring(0,id.length()-1);

String sql="delete from "+tablename+" where id in ("+id+")";
//out.print(sql);
connDbBean.hsgexecute(sql);
out.print("<script>alert('操作成功!!');location.href='"+comew+"';</script>");
  	  
}
else
{
out.print("<script>alert('对不起，您没有选择任何要删除的行!!');history.back();</script>");
}

%>



